# uncomment to run, then recomment it out so you don't run it every timecensus_api_key("2a6f8c21a30d3024e038d67d7d4eba647dc79cd4", install=TRUE, overwrite=TRUE)
Your original .Renviron will be backed up and stored in your R HOME directory if needed.
Your API key has been stored in your .Renviron and can be accessed by Sys.getenv("CENSUS_API_KEY").
To use now, restart R or run `readRenviron("~/.Renviron")`
Warning: Found less unique colors (9) than unique zcol values (114)!
Interpolating color vector to match number of zcol values.
Customize popups
Code
mypopup <- glue::glue("<strong>{mo_counties_withgeo$NAM}</strong><br /> Total Population: {mo_counties_withgeo$totalpop}<br /> Median Income: {mo_counties_withgeo$medincome}") %>%lapply(htmltools::HTML)
Code
head(mypopup)
[[1]]
<strong>Carroll County, Missouri</strong><br />
Total Population: 8564<br />
Median Income: 54967
[[2]]
<strong>New Madrid County, Missouri</strong><br />
Total Population: 16658<br />
Median Income: 42370
[[3]]
<strong>Holt County, Missouri</strong><br />
Total Population: 4295<br />
Median Income: 52500
[[4]]
<strong>Lincoln County, Missouri</strong><br />
Total Population: 58689<br />
Median Income: 76622
[[5]]
<strong>Boone County, Missouri</strong><br />
Total Population: 182170<br />
Median Income: 62653
[[6]]
<strong>Jefferson County, Missouri</strong><br />
Total Population: 225913<br />
Median Income: 71285